package com.dailyblue.java.spring.ioc.annotation.config;

import com.dailyblue.java.spring.ioc.annotation.pojo.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
// 我是一个配置管理类
@Configuration
@ComponentScan("com")
// 负责手动产生Person类的对象
public class ManuallyGenerated {

    // 手动将对象存放到IoC容器中
    @Bean
    public Person getPersonInstance(){
        System.out.println("准备产生Person类的对象");
        return new Person();
    }
}
